package com.shijie.sjoj.service.provider.configure;

import com.shijie.sjoj.model.component.IdGeneratorRedis;
import com.shijie.sjoj.model.component.LocalDateTimeFillAop;
import com.shijie.sjoj.model.component.LongFillAop;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.core.StringRedisTemplate;

/**
 * 组件配置类
 *
 * @author ZSJ
 */
@Configuration
public class ComponentConfig {

    @Bean
    public IdGeneratorRedis idGenerator(StringRedisTemplate stringRedisTemplate) {
        return new IdGeneratorRedis(stringRedisTemplate);
    }

    @Bean
    public LocalDateTimeFillAop localDateTimeFillAop() {
        return new LocalDateTimeFillAop();
    }

    @Bean
    public LongFillAop longFillAop() {
        return new LongFillAop();
    }


}
